import axios from 'axios'
import request from '@/utils/request'

export function getDeviceList() {
    return request({
        url: '/item/factoryDevice/all',
        method: 'get'
    })
}

export function getNewData(deviceID) {
    return request({
        url: '/item/factorydata/newestData',
        method: 'get',
        params: {
            deviceID
        }
    })
}

export function getThreshold() {
    return request({
        url: '/item/factorydata/threshold',
        method: 'get'
    })
}

export function getDataTop(deviceID) {
    return request({
        url: '/item/factorydata/peak',
        method: 'get',
        params: {
            deviceID
        }
    })
}

export function getLineList(deviceID) {
    return request({
        url: '/item/factorydata/changeCurve',
        method: 'get',
        params: {
            deviceID
        }
    })
}

export function getDataStyle(deviceID) {
    return request({
        url: '/item/factorydata/satisfy',
        method: 'get',
        params: {
            deviceID
        }
    })
}

export function getWarnData(deviceID) {
    return request({
        url: '/item/factorydata/abnormal',
        method: 'get',
        params: {
            deviceID
        }
    })
}

export function getRoomData(deviceID) {
    return request({
        url: '/item/factoryDevice/distribute',
        method: 'get',
        params: {
            deviceID
        }
    })
}